package com.sdk.springbootadvancedsearch.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.Version;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.Instant;

@Getter
@Setter
public class BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;


    private Long id;


    private Long tenantId;


    @TableField(fill = FieldFill.INSERT)
    @Version
    private Integer version;


    @TableField(fill = FieldFill.INSERT)
    private String createdBy;


    @TableField(value="created_time",fill = FieldFill.INSERT)
    private Instant createdTime;


    @TableField(value="updated_by",fill = FieldFill.INSERT_UPDATE)
    private String updatedBy;


    @TableField(value="updated_time",fill = FieldFill.INSERT_UPDATE)
    private Instant updatedTime;


    @TableField(value="is_deleted",fill = FieldFill.INSERT)
    private Boolean isDeleted;


    @TableField(value="deleted_by")
    private String deletedBy;


    @TableField("deleted_time")
    private Instant deletedTime;
}
